PlayMoviePreview
ThePlayMoviePreview
function plays a movie's preview.
pascal void PlayMoviePreview (Movie theMovie, MoviePreviewCallOutProc callOutProc, long refcon);
theMovie
- Specifies the movie for this operation. Your application obtains this movie identifier from such functions as
NewMovie
,NewMovieFromFile
, andNewMovieFromHandle
(described on page 2-80, page 2-76, and page 2-78, respectively).callOutProc
- Contains a pointer to a movie callout function in your application. The Movie Toolbox calls this function repeatedly while the movie preview is playing. You can use this function to stop the preview. If you do not want to assign a function, set this parameter to
nil
.- Your function should have the following form:
pascal Boolean MyCallOutProc (long refcon);
- The
refCon
parameter contains the reference constant you specified when you called thePlayMoviePreview
function.- Your function returns a Boolean value. The Movie Toolbox examines this value before continuing. If your function sets this value to
false
, the Movie Toolbox stops the preview and returns to your application. For details, see "Movie Callout Functions" on page 2-337.- Note that if you call the
GetMovieActiveSegment
function (described on page 2-122) from within your movie callout function, the Movie Toolbox will have changed the active movie segment to be the preview segment of the movie. The Movie Toolbox restores the active segment when the preview is done playing.refcon
- Contains a reference constant for your function. The Movie Toolbox passes this value to your function.
DESCRIPTION
ThePlayMoviePreview
function sets the movie into preview mode, plays the movie preview, sets the movie back to normal playback mode, and returns to your application. The Movie Toolbox plays the preview in the movie's graphics world.ERROR CODES
invalidMovie -2010 This movie is corrupted or invalid SEE ALSO
Use theSetMoviePreviewTime
function, described on page 2-109, to define the starting time and duration of the movie preview.